class Point {

}

class PointFictory {

    public static Point makePointXY(double x, double y) {

        Point p = new Point();
        // 对 Point 的属性进行赋值
        return p;
    }

    public static Point makePointRA(double r, double a) {

        Point p = new Point();
        // 通过 r 和 a 对 p 的属性进行赋值
        return p;
    }
}

public class Demo {

    public static void main(String[] args) {

        Point p = PointFictory.makePointXY(10, 20);
    }
}
